// let app = new Vue({
// 	el: "#app",
// 	data() {
// 		return {
// 			videoArr: [
// 				"videos/1.mp4", "videos/2.mp4", "videos/3.mp4"
// 			],
// 			videoIndex:0
// 		}
// 	},
// 	computed:{
// 		videourl:function(){
// 			console.log(this.videoArr[this.videoIndex]);
// 			return this.videoArr[this.videoIndex];
// 		}
// 	},
// 	methods: {
// 		changenext(){
// 			this.videoIndex++;
// 			if(this.videoIndex>this.videoArr.length-1){
// 				this.videoIndex = 0;
// 			}
// 		},
// 		changeprev(){
// 			this.videoIndex--;
// 			if(this.videoIndex>this.videoArr.length-1){
// 				this.videoIndex = 0;
// 			}
// 		},
// 	},
// 	async mounted() {

// 	}
// });
let app = new Vue({
	el: "#app",
	data() {
		return {
			tableData: [{
				id: '1',
				name: '徐州季洁组视频.mp4'
			}, {
				id: '2',
				name: '无锡单静静组视频.mp4'
			}, {
				id: '3',
				name: '无锡聂晨组视频.mp4'
			}, {
				id: '4',
				name: '1.登录-如何登录和退出系统.mp4'
			}, {
				id: '5',
				name: '2.1公共客户-如何批量导入公共客户.mp4'
			}, {
				id: '6',
				name: '2.2公共客户-如何添加单个公共客户.mp4'
			}, {
				id: '7',
				name: '2.3公共客户-如何分配公共客户.mp4'
			}, {
				id: '8',
				name: '2.4公共客户-如何查询公共客户.mp4'
			}],
			activeVideo: [
				"videos/1.mp4", "videos/2.mp4", "videos/3.mp4",
				"videos/1.登录-如何登录和退出系统.mp4",
				"videos/2.1公共客户-如何批量导入公共客户.mp4",
				"videos/2.2公共客户-如何添加单个公共客户.mp4",
				"videos/2.3公共客户-如何分配公共客户.mp4",
				"videos/2.4公共客户-如何查询公共客户.mp4"
			],
			videoIndex: 4,
			videos: [{
					id: 1,
					title: '我是视频1缩略图',
					thumbnail: './images/v1.png',
					speaker: '市场team',
					likes: 0,
					views: 0,
					describe: "加油"
				},
				{
					id: 2,
					title: '我是视频2缩略图',
					thumbnail: './images/v2.png',
					speaker: '财务team',
					likes: 0,
					views: 0,
					describe: "加油."
				},
				{
					id: 3,
					title: '我是视频3缩略图',
					thumbnail: './images/v3.png',
					speaker: '人事team',
					likes: 0,
					views: 0,
					describe: "加油..."
				},
				{
					id: 2,
					title: '我是视频4缩略图',
					thumbnail: './images/v2.png',
					speaker: '财务team',
					likes: 0,
					views: 0,
					describe: "加油."
				},
				{
					id: 3,
					title: '我是视频5缩略图',
					thumbnail: './images/v3.png',
					speaker: '人事team',
					likes: 0,
					views: 0,
					describe: "加油..."
				}
			]

		}
	},
	// computed:{
	// 	videourl:function(){
	// 		return this.activeVideo[2];
	// 	}
	// },
	methods: {
		confirm(row, column, event) {
			console.log(row.id)
			this.videoIndex = row.id-1;
			// console.log(column)
			// console.log(event)
			// 视频点浏览器            
		},
		chooseVideo: function(video) { // 设置视频为当前视频      
			console.log(video)
			this.videoIndex = video.id - 1;
			// 视频点浏览器            
			video.views += 1
		},


		selectionChange(selection) {
			this.selection = selection
		},




		async mounted() {
			// 自动调整表格高度
			window.onresize = () => {
				return (() => {
					this.tableHeight = window.innerHeight - 180
				})()
			}


		}
	}
});
